package com.nsi.o2o.service;

import com.nsi.o2o.dto.ImageHolder;
import com.nsi.o2o.dto.ProductExecution;
import com.nsi.o2o.entity.Product;
import com.nsi.o2o.exceptions.ProductOperationException;

import java.util.List;

/**
 * @author: Luo Zhen
 * @date: 2018/9/18 17:36
 * @description:
 */
public interface ProductService {

    /**
     * 添加商品信息带多图上传
     *
     * @param product
     * @param thumbnail
     * @param productImgList
     * @return
     * @throws ProductOperationException
     */
    ProductExecution addProduct(Product product, ImageHolder thumbnail, List<ImageHolder> productImgList) throws ProductOperationException;

    /**
     * 修改方法
     *
     * @param product
     * @param thumbnail
     * @param productImgList
     * @return
     * @throws ProductOperationException
     */
    ProductExecution modifyProduct(Product product, ImageHolder thumbnail, List<ImageHolder> productImgList) throws ProductOperationException;

    /**
     * 查询商品列表并分页，可输入的条件有：商品名(模糊) 商品状态 店铺Id 商品类别
     *
     * @param productCondition
     * @param pageIndex
     * @param pageSize
     * @return
     */
    ProductExecution getProductList(Product productCondition, int pageIndex, int pageSize);

    /**
     * 根据商品Id 返回详情
     *
     * @param productId
     * @return
     */
    Product getProductById(long productId);
}
